﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;


namespace BUS
{
    public class NhaCungCapBUS
    {
        public List<NhaCungCapDTO> layDSNhaCungCapTheoLoaiNCC(string loaincc)
        {
            try
            {
                NhaCungCapDAO dao = new NhaCungCapDAO();
                return dao.layThongTinNhaCungCapTheoLoaiNCC(loaincc);
            }
            catch (Exception ex)
            {
                return new List<NhaCungCapDTO>();
            }
        }

        public NhaCungCapDTO layNhaCungCapTheoMaNCC(string mancc)
        {
            try
            {
                NhaCungCapDAO dao = new NhaCungCapDAO();
                return dao.layThongTinNhaCungCap(mancc);
            }
            catch (Exception ex)
            {
                return new NhaCungCapDTO();
            }
        }

    }
}
